/**
 * Copyright &copy; 2012-2016 <a href="https://istep.lczyfz.com">Istep</a> All rights reserved.
 */
package com.lczyfz.istep.modules.scene.entity;

import org.hibernate.validator.constraints.Length;

import com.lczyfz.istep.common.persistence.DataEntity;

/**
 * 安全组规则Entity
 * @author dh
 * @version 2017-03-28
 */
public class SceneSecurityGroupRule extends DataEntity<SceneSecurityGroupRule> {
	
	private static final long serialVersionUID = 1L;
	private String direction;		// 规则的方向
	private String tenantId;		// 租户id
	private String ethertype;		// IP版本
	private String protocol;		// IP协议
	private String remoteGroupId;		// 远程组UUID
	private String remoteIpPrefix;		// 远程IP前缀
	private String securityGroupId;		// 安全组ID
	private String fromPort;		// 起始端口号
	private String toPort;		// 终止端口号
	private String projectId;

	private String remoteGroupName;		//远端安全组名称

	public SceneSecurityGroupRule() {
		super();
	}

	public SceneSecurityGroupRule(String id){
		super(id);
	}

	@Length(min=0, max=64, message="规则的方向长度必须介于 0 和 64 之间")
	public String getDirection() {
		return direction;
	}

	public void setDirection(String direction) {
		this.direction = direction;
	}
	
	@Length(min=0, max=64, message="租户id长度必须介于 0 和 64 之间")
	public String getTenantId() {
		return tenantId;
	}

	public void setTenantId(String tenantId) {
		this.tenantId = tenantId;
	}
	
	@Length(min=0, max=64, message="IP版本长度必须介于 0 和 64 之间")
	public String getEthertype() {
		return ethertype;
	}

	public void setEthertype(String ethertype) {
		this.ethertype = ethertype;
	}
	
	@Length(min=1, max=64, message="IP协议长度必须介于 1 和 64 之间")
	public String getProtocol() {
		return protocol;
	}

	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}
	
	@Length(min=0, max=64, message="远程组UUID长度必须介于 0 和 64 之间")
	public String getRemoteGroupId() {
		return remoteGroupId;
	}

	public void setRemoteGroupId(String remoteGroupId) {
		this.remoteGroupId = remoteGroupId;
	}
	
	@Length(min=0, max=64, message="远程IP前缀长度必须介于 0 和 64 之间")
	public String getRemoteIpPrefix() {
		return remoteIpPrefix;
	}

	public void setRemoteIpPrefix(String remoteIpPrefix) {
		this.remoteIpPrefix = remoteIpPrefix;
	}
	
	@Length(min=1, max=64, message="安全组ID长度必须介于 1 和 64 之间")
	public String getSecurityGroupId() {
		return securityGroupId;
	}

	public void setSecurityGroupId(String securityGroupId) {
		this.securityGroupId = securityGroupId;
	}
	
	@Length(min=0, max=64, message="起始端口号长度必须介于 0 和 64 之间")
	public String getFromPort() {
		return fromPort;
	}

	public void setFromPort(String fromPort) {
		this.fromPort = fromPort;
	}
	
	@Length(min=0, max=64, message="终止端口号长度必须介于 0 和 64 之间")
	public String getToPort() {
		return toPort;
	}

	public void setToPort(String toPort) {
		this.toPort = toPort;
	}


	public String getRemoteGroupName() {
		return remoteGroupName;
	}

	public void setRemoteGroupName(String remoteGroupName) {
		this.remoteGroupName = remoteGroupName;
	}

	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

}